package com.turing.service.impl;

import com.turing.domain.BrandInfo;
import com.turing.mapper.BrandInfoMapper;
import com.turing.service.IBrandInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class BrandInfoServiceImpl implements IBrandInfoService {

    @Autowired
    private BrandInfoMapper brandInfoMapper;

    @Override
    public List<BrandInfo> selectAll() {
        return brandInfoMapper.selectList();
    }

    @Override
    public BrandInfo selectById(Long id) {
        return brandInfoMapper.selectByPrimaryKey(id);
    }

    @Override
    public int insertOne(BrandInfo brandInfo) {
        return brandInfoMapper.insertSelective(brandInfo);
    }

    @Override
    public int updateById(BrandInfo brandInfo) {
        return brandInfoMapper.updateByPrimaryKeySelective(brandInfo);
    }

    @Override
    public int deleteByIds(Long[] ids) {
        return brandInfoMapper.deleteByPrimaryKey(ids);
    }

    @Override
    public List<BrandInfo> selectPage(BrandInfo brandInfo) {
        return brandInfoMapper.selectPage(brandInfo);
    }
}
